home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1994 August: Tool Chest / Dev.CD Aug 94.toast / Tool Chest / Developer Utilities / Installer 4.0GM SDK / Script Examples / Folder Atom / Folder Atom.r < prev    next >
Encoding:
Text File  |  1994-02-10  |  1.7 KB  |  75 lines  |  [TEXT/MPS ]

  1. #include "InstallerTypes.r"
  2.  
  3. //    This little example shows how to copy the contents of a folder to the destination drive.  It uses
  4. //    the 'infm' resource atom which has the total size of the source files and of course the appropriate
  5. //    'infs' for the target and the source folders.
  6.  
  7. //    NOTE:  There are NO flags like there are for the 'infa', for updating and deletes.  In other words,
  8. //            all of the files in the source folder will always be copied on the Install and NO files will
  9. //            be deleted on the Remove.  If you need these options it is a good sign that you should be
  10. //            using the 'infa' instead.  You cannot use the 'infm' to Install into the System Folder either.
  11.  
  12.  
  13. resource 'infr' (kEasyInstallFrameworkRsrcID, "easy framework") {
  14.     format0 {
  15.         {    pickFirst,
  16.             {    10400    }
  17.             }
  18.         }
  19.     };
  20.  
  21. resource 'infr' (kCustomInstallFrameworkRsrcID, "custom framework") {
  22.     format0 {
  23.         {    pickFirst,
  24.             {    10400    }
  25.             }
  26.         }
  27.     };
  28.    
  29. resource 'inrl' (10400, "Add packages and user messages.") {
  30.     format0 {
  31.         {    addPackages {{    9002    }},
  32.             addUserDescription { "Click the Install button to install the Apple Utilities folder.\n" }
  33.             }
  34.         }
  35.     };
  36.  
  37. resource 'inpk' (9002, "The Test Script") {
  38.     format0 {
  39.         showsOnCustom,
  40.         notRemovable,
  41.         dontForceRestart,
  42.         0,            
  43.         0,
  44.         "The Apple Utilities folder",
  45.         {    'infm', 12051    }
  46.         }
  47.     };
  48.  
  49. resource 'infm' (12051, "The Folder Merge") {
  50.     format0 {
  51.         0,
  52.         10001,
  53.         10000,
  54.         "Apple Utilities Folder"
  55.         }
  56.     };
  57.     
  58. resource 'infs' (10000, "Source File info") {
  59.     'Fldr',
  60.     'Fldr',
  61.     0x0,
  62.     noSearchForFile,
  63.     TypeCrMustMatch,
  64.     "Tidbits:Apple Utilities:"
  65.     };
  66.     
  67. resource 'infs' (10001, "Dest File info") {
  68.     'Fldr',
  69.     'Fldr',
  70.     0x0,
  71.     noSearchForFile,
  72.     TypeCrMustMatch,
  73.     ":Apple Utilities:"
  74.     };
  75.